<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .box{
            height: 500px;
            width: 500px;
            border: 2px solid black;
            margin: 100px auto;
            display: flex;
        }
        /*
        display:flex
        影响：1.子元素横向排列
              2.让行内元素变成块级元素block
              3.只有一个子元素的情况 margin auto 可以让子元素水平垂直居中
        */
        .box div{
            width: 100px;
            height: 100px;
            border: 2px dashed red;
        }
        .div1{
            align-self: flex-end;
        }
        .div2{
            align-self:center;
        }
        .div5{
            /*拉伸  占满盒子*/
            align-self: stretch;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="div1">111</div>
        <div class="div2">222</div>
        <div class="div3">333</div>
        <div class="div4">444</div>
        <div class="div5">555</div>
    </div>
</body>
</html>